package com.utrailer.resource.controller;

import com.utrailer.common.rest.ResultVO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author Chen Song
 * @since
 */
@RestController
public class FeignVehicleController {

    @RequestMapping("/vehicle/detail")
    public ResultVO<String> detail(@RequestParam Long id) {
        if (id % 2 == 1) {
            throw new RuntimeException("cause by vehicle");
        }
        return ResultVO.error(String.format("no such id[%s]", id));
    }

}
